/**
 * v-hasPermi 操作权限处理
 */
import store from '@/store'
import defaultSettings from '@/config/settings'
export default {
  inserted (el, binding, vnode) {
    return;
    const roles = store.getters.roles;
    if(roles.includes('surper-admin')){
      return
    }
    const {
      value
    } = binding;
    const permissions = store.getters.permissions;
    var hasPermissions = true;
   if (typeof (value) == 'string') {
      let permis = permissions.filter(item => {
        return item == value
      })

      if (permis.length == 0) {
        hasPermissions = false;
      }
      if (!hasPermissions) {
        el.parentNode && el.parentNode.removeChild(el)
      }
    } else {
      throw new Error(`请设置操作权限标签值`)
    }
  }
}